<%@page import="edu.cqupt.dao.Book"%>
<%@page import="java.util.List"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div align="center">
		<h1>修改图书</h1>
		<form action="update_book" method="post">
			<table>
				<%
					Book book = (Book)request.getAttribute("book");
				%>
				<tr>
					<td><input type='hidden' name='book_id' value='<%= book.getBookId()%>'></td>
				</tr>
				<tr>
					<th>书名</th>
					<td><input type='text' name='book_name' value='<%= book.getBookName()%>'></td>
				</tr>
				<tr>
					<th>作者</th>
					<td><input type='text' name='author' value='<%= book.getAuthor()%>'></td>
				</tr>
				<tr>
					<th>价格</th>
					<td><input type='text' name='price' value='<%= book.getPrice()%>'></td>
				</tr>
				<tr>
					<th colspan="2" align="right"><input type="submit" value="提交"></th>
				</tr>
			</table>
		</form>
		<a href="list_all_book">返回图书列表</a>
	</div>
</body>
</html>